const Koa = require('koa')
let app = new Koa()
const Router = require('koa-router')
let router = new Router
router.get('/test', ctx => {
    console.log('有请求');
    ctx.body = {
        info: '这是4000端口的数据'
    }
})
router.get('/getnew', ctx => {
    console.log('有请求过来');
    ctx.body = {
        info: '4000端口的数据1111'
    }
})
app.use(router.routes())
app.listen(4000)